package com.sysu.ooad.util;

import com.sysu.ooad.dto.HomeworkFacade;

import net.sf.json.JsonConfig;
import net.sf.json.util.PropertyFilter;

public class TeacherJsonConfigFactory implements JsonConfigFactory {

	public JsonConfig createJsonConfig() {
		JsonConfig cfg = new JsonConfig();
		cfg.setJsonPropertyFilter(new PropertyFilter() {
			public boolean apply(Object source, String name, Object value) {
				if (name.equals("course")) {
					return true;
				} else {
					return false;
				}
			}
		});
		return cfg;
	}
}
